﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServerYuGi;
using Yugi.Client.Card;

namespace APIEffect.REQUEST
{
    public class Request_API
    {
        SSupervisor super;
        public Request_API(SSupervisor super)
        {
            this.super = super;
        }

        //----------------------------- Nguoi choi--------------------------------
        public List<int> Choice_Card_Table_CurrentPlayer(int SoLaCanChon,YType type)
        {            
            super.SendMessage_REQUEST_CHONBAI_NGUOICHOI_BAN_ToID(super.TurnManager.IDPlayerTrongLuot, SoLaCanChon,type);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
        public List<int> Choice_Card_Hand_CurrentPlayer(int SoLaCanChon, YType type)
        {
            super.SendMessage_REQUEST_CHONBAI_NGUOICHOI_TAY_ToID(super.TurnManager.IDPlayerTrongLuot, SoLaCanChon, type);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
      
        //------------------------------Doi thu-----------------------------------
        public List<int> Choice_Card_Hand_AnotherPlayer(int SoLaCanChon, YType type)
        {
            super.SendMessage_REQUEST_CHONBAI_DOITHU_TAY_ToID(super.TurnManager.IDPlayerTrongLuot, SoLaCanChon, type);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
        public List<int> Choice_Card_Table_AnotherPlayer(int SoLaCanChon,YType type)
        {
            super.SendMessage_REQUEST_CHONBAI_DOITHU_BAN_ToID(super.TurnManager.IDPlayerTrongLuot, SoLaCanChon,type);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
        public List<int> Choice_Card_List(int SoLaCanChon, List<int> danhsach)
        {
            super.SendMessage_REQUEST_CHONBAI_DANHSACH_ToID(super.TurnManager.IDPlayerTrongLuot, SoLaCanChon, danhsach.Count, danhsach);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
        public List<int> Choice_Card_List(int SoLaCanChon, List<int> danhsach,int nguoinhan)
        {
            super.SendMessage_REQUEST_CHONBAI_DANHSACH_ToID(nguoinhan, SoLaCanChon, danhsach.Count, danhsach);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
        //----------------------------------------------------------------------------------
        public List<int> Choice_Card_OnTable(int nguoinhan,int SoLaCanChon, YType type)
        {
            super.SendMessage_REQUEST_CHONBAI_TRENBAN_ToID(nguoinhan, SoLaCanChon, type);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
        //-------------------------------Ask Player-------------------------------
        public List<int> Ask_Player(int id_player,string message)
        {
            super.SendMessage_REQUEST_ASK(id_player, message);
            super.WaitManager.Waiting();
            return super.WaitManager.GetResult();
        }
    }
}
